﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="rep.aspx.vb" Inherits="customtech.rep" %>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
    REPUTATION</h1>
<br />
<h3>
    MOST RATED BUILDS</h3>
<br />
    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1">
        <series>
            <asp:Series ChartType="Bar" Name="Series1" XValueMember="BuildName" 
                YValueMembers="AverageRating">
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:connstr %>" 
        ProviderName="<%$ ConnectionStrings:connstr.ProviderName %>" 
        
    SelectCommand="SELECT [BuildName], [AverageRating] FROM [Builds Query1] ORDER BY [AverageRating] DESC">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:connstr %>" 
        ProviderName="<%$ ConnectionStrings:connstr.ProviderName %>" 
        
        
    SelectCommand="SELECT [BuildName], [CountOfID] FROM [LikeCount] ORDER BY [CountOfID] DESC">
    </asp:SqlDataSource>
    <br />
<h3>
    MOST LIKED BUILD</h3>
    <br />
    <asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource2">
        <series>
            <asp:Series ChartType="Bar" Name="Series1" XValueMember="BuildName" 
                YValueMembers="CountOfID">
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:connstr %>" 
        ProviderName="<%$ ConnectionStrings:connstr.ProviderName %>" 
        
    SelectCommand="SELECT [UserName], [CountOfID] FROM [commentcount2] ORDER BY [CountOfID] DESC">
    </asp:SqlDataSource>
    <br />
<h3>
    MOST ACTIVE USER (BASED ON COMMENTS)</h3>
<br />
    <asp:Chart ID="Chart3" runat="server" DataSourceID="SqlDataSource3">
        <series>
            <asp:Series ChartType="Bar" Name="Series1" XValueMember="UserName" 
                YValueMembers="CountOfID">
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
    <br />
    <br />
    <h3>
        MOST ACTIVE USER (BASED ON BUILDS)</h3>
    <br />
    <asp:Chart ID="Chart4" runat="server" DataSourceID="SqlDataSource4">
        <Series>
            <asp:Series ChartType="Bar" Name="Series1" XValueMember="UserName" 
                YValueMembers="CountOfBuildName">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
</asp:Chart>
<asp:SqlDataSource ID="SqlDataSource4" runat="server" 
    ConnectionString="<%$ ConnectionStrings:connstr %>" 
    ProviderName="<%$ ConnectionStrings:connstr.ProviderName %>" 
    SelectCommand="SELECT [UserName], [CountOfBuildName] FROM [profileview] ORDER BY [CountOfBuildName] DESC">
</asp:SqlDataSource>
    <br />
    <br />
</asp:Content>
